<?php defined('InShopNC') or exit('Access Invalid!');?>

<div class="tabmenu">
  <?php include template('layout/submenu');?>
<a href="<?php echo urlShop('lottery_activity', 'lotteryActivity_add'); ?>" class="ncsc-btn ncsc-btn-green" title="新增礼品"><i class="icon-plus-sign"></i>新增礼品</a>
</div>

<table class="search-form">
  <form method="get">
    <input type="hidden" name="act" value="lottery_activity" />
    <tr>
      <td>&nbsp;</td>
      <th>活动名称</th>
      <td class="w160"><input class="text" type="text" name="activity_name" value="<?php echo $_GET['activity_name'];?>"/></td>
      <td class="w70 tc"><label class="submit-border"><input type="submit" class="submit" value="<?php echo $lang['nc_search'];?>" /></label></td>
    </tr>
  </form>
</table>
<table class="ncsc-default-table">
  <thead>
    <tr>
      <th class="w10"></th>
      <th class="w100">活动编号</th>
      <th class="w150">活动名称</th>
      <th class="w130">兑奖开始时间</th>
      <th class="w130">兑奖结束时间</th>
      <th class="w100"><?php echo $lang['nc_handle'];?></th>
    </tr>
  </thead>
  <tbody>
    <?php if(!empty($output['lists']) && is_array($output['lists'])){?>
    <?php foreach($output['lists'] as $key=>$obj){?>
    <tr class="bd-line">
      <td></td>
      <td><?php echo $obj['lottery_activity_id'];?></td>
      <td><?php echo $obj['activity_name'];?></td>
      <td><?php echo $obj['exchage_start_date_text'];?></td>
      <td><?php echo $obj['exchage_end_date_text'];?></td>
      <td class="nscs-table-handle"><span><a href="<?php echo urlShop('lottery_activity', 'lotteryActivity_edit', array('activityId' => $obj['lottery_activity_id']));?>" class="btn-blue"><i class="icon-edit"></i><p><?php echo $lang['nc_edit'];?></p></a></span>
        <span><a href="javascript:void(0)" onclick="ajax_get_confirm('<?php echo $lang['nc_ensure_del'];?>', '<?php echo urlShop('lottery_activity', 'drop_activity', array('activityId' => $obj['lottery_activity_id']));?>');" class="btn-red"><i class="icon-trash"></i><p><?php echo $lang['nc_del'];?></p></a></span></td>
    </tr>
    <?php }?>
    <?php }else{?>
    <tr>
      <td colspan="20" class="norecord"><div class="warning-option"><i class="icon-warning-sign"></i><span><?php echo $lang['no_record'];?></span></div></td>
    </tr>
    <?php }?>
  </tbody>
  <tfoot>
    <tr>
      <td colspan="20"><div class="pagination"><?php echo $output['show_page']; ?></div></td>
    </tr>
  </tfoot>
</table>
